<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCaseSharesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('case_shares', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('case_customer_id')->index()->nullable()->comment('客户');
            $table->integer('case_contract_id')->index()->nullable()->comment('合同');
            $table->integer('case_batch_id')->index()->nullable()->comment('批次');
            $table->integer('case_case_id')->index()->nullable()->comment('案件');
            $table->integer('user_id')->comment('用户');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('case_shares');
    }
}
